package com.woniu.market_stall.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.woniu.market_stall.entity.ManagerDept;
import com.woniu.market_stall.mapper.LogMapper;
import com.woniu.market_stall.vo.LogVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LogService {
    @Autowired
    LogMapper logMapper;


    public PageInfo<LogVo> queryLogByPage(Integer now, Integer size, String name) {
        PageHelper.startPage(now,size);
        List<LogVo> list = logMapper.selectLogByName(name);
        return new PageInfo<>(list);
    }

    public void removeByKey(Integer id) {
        logMapper.delete(id);
    }

    public void removeBatch(String id){
        logMapper.delBatch(id);
    }
}
